package bam.service.impl;

import java.util.Date;

import bam.dao.RecordSSidDao;
import bam.service.RecordService;
import bam.service.RecordSSidService;

public class RecordSSidServiceImpl implements RecordSSidService {
private RecordSSidDao recordSSidDao;

public int slePledgeCountNum(String areaid, Date endTime, Date startTime, int money) {
	
	int result = 0;
	try {
		result = recordSSidDao.slePledgeCountNum(areaid, endTime, startTime, money);
	} catch (Exception e) {
		result=-1;
		e.printStackTrace();
	}
	return result;
}

public Double slePledgeSumNum(String areaid, Date endTime, Date startTime,int money )
		 {
	Double result = -1.0;
	try {
		result =recordSSidDao.slePledgeSumNum(areaid, endTime, startTime, money );
	} catch (Exception e) {
		result=-1.0;
		e.printStackTrace();
	}
	return result;
}

public int sleTopUpCountNum(String areaid, Date endTime, Date startTime, int money)
		 {
	int result = 0;
	try {
		result = recordSSidDao.sleTopUpCountNum(areaid, endTime, startTime, money);
	} catch (Exception e) {
		result=-1;
		e.printStackTrace();
	}
	return result;
}

public Double sleTopUpSumNum(String areaid, Date endTime, Date startTime)
		 {
	Double result = -1.0;
	try {
		result =recordSSidDao.sleTopUpSumNum(areaid, endTime, startTime);
	} catch (Exception e) {
		result=-1.0;
		e.printStackTrace();
	}
	return result;
}

public int sleOutPledgeCountNum(String areaid, Date endTime, Date startTime,
		int money)  {
	 
	int result = 0;
	try {
		result =recordSSidDao.sleOutPledgeCountNum(areaid, endTime, startTime, money);
	} catch (Exception e) {
		result=-1;
		e.printStackTrace();
	}
	return result;
}

public int sleNetLongtimeCountNum(String areaid, Date endTime, Date startTime,
		int longtime)  {
	int result = 0;
	try {
		result =recordSSidDao.sleNetLongtimeCountNum(areaid, endTime, startTime, longtime);
	} catch (Exception e) {
		result=-1;
		e.printStackTrace();
	}
	return result;
}

public int sleNetLongtimeSumNum(String areaid, Date endTime, Date startTime)
		 {
	int result = 0;
	try {
		result = recordSSidDao.sleNetLongtimeSumNum(areaid, endTime, startTime);
	} catch (Exception e) {
		result=-1;
		e.printStackTrace();
	}
	return result;
}

public void setRecordSSidDao(RecordSSidDao recordSSidDao) {
	this.recordSSidDao = recordSSidDao;
}



}
